NetLogo banner

Home
Download
Help
Resources
Extensions
FAQ
NetLogo Publications
Contact Us
Donate

Models:
Library
Community
Modeling Commons

Beginners Interactive NetLogo Dictionary (BIND)
NetLogo Dictionary

User Manuals:
Web
Printable
Chinese
Czech
Farsi / Persian
Japanese
Spanish

  Donate

NetLogo User Community Models

(back to the NetLogo User Community Models)

[screen shot]

Download
If clicking does not initiate a download, try right clicking or control clicking and choosing "Save" or "Download".(The run link is disabled for this model because it was made in a version prior to NetLogo 6.0, which NetLogo Web requires.)

WHAT IS IT?

This application is a simulation of the "Santa Fe Ant Trail" which is a standard problem in the areas of Genetic Programming and Grammatical Evolution. The objective of this problem is to find a computer program to control an Artificial Ant, so that it can find all 89 pieces of food located on the grid.

With this model, the user can do the following things:
a. Write a set of actions (in the NetLogo programming language) and run them to observe the behaviour of the Artificial Ant.
b. Simulate, verify, and investigate the Santa Fe Ant Trail solutions of other related programs (for example, some Genetic Programming and Grammatical Evolution software packages).

HOW IT WORKS

The Artificial Ant operates in a square 32x32 toroidal grid in the plane. The Ant starts in the upper left cell of the grid (0, 0) facing east. The Santa Fe Trail consists of 144 squares with 21 turns, and the 89 units of food are distributed non-uniformly along it.

The Artificial Ant can use three operations: move, turn-right, turn-left. Each of these takes one time unit. Indeed, the Artificial Ant can use one sensing function: food-ahead. It looks into the square the Ant is currently facing and returns true or false depending upon whether that square contains food or is empty respectively.

HOW TO USE IT

Here are a few guidelines of how to use the simulation:

1. Set the model’s speed to normal (adjust the speed slider in the toolbar). This will let the setup procedure to redraw the path very quickly.

2. Press the “Setup” button to initialise the world. After that the Santa Fe Trail will appear in the 2D view. Indeed, the multi-line input box “Ant-Actions” is initialised with one of the Koza’s solutions (1992) of the Santa Fe Trail problem, written in the NetLogo programming language. These NetLogo commands are editable by you (the user) and will be executed by the Ant when you press “Go”.

3. Set the “Max-Steps” slider to the limit of steps (time units) which are allowed to be executed by the Ant during the simulation. Don’t confuse these steps with the NetLogo’s discrete steps called “ticks”.

4. Turn-on the switch “Trail” if you want to colour the path of the Ant.

5. Set the model’s speed to very slow (adjust the speed slider in the toolbar) in order you can view the Ant’s movements. Otherwise, the Ant will run so fast you only see the results of the simulation.

6. The monitors “Steps” and “Food Eaten” display the current number of the executed actions and the pieces of food eaten by the Ant so far respectively.

7. Press the button “Go” to start the simulation.

THINGS TO TRY

Many GP and GE packages provide implementations of the Artificial Ant (Santa Fe Trail) problem. Run them and get the solutions they found in order to verify them by simulating them in this model. Indeed, you can investigate the behaviour of the Ant during the simulation.

Also, you can write manually your own possible solution to the Santa Fe Trail problem (using the NetLogo programming language) and test it in this model / simulation.

EXTENDING THE MODEL

Try to change the code in order to load the Santa Fe Trail from an external text file. Then create different text files with other trails as well (e.g. John Muir trail) and let the user of the model to select the trail to be used in the simulation.

NETLOGO FEATURES

The built-in RUN primitive is used to execute the NetLogo code (Ant-Actions) which controls the behaviour of the Artificial Ant.

HOW TO CITE

If you mention this model in an academic publication, we ask that you include these citations for the model itself and for the NetLogo software:
- Georgiou, L. (2009). NetLogo Santa Fe Ant Trail model. http://www.bangor.ac.uk/~eep201/jge. School of Computer Science, Bangor University, Wales, GB.
- Wilensky, U. (1999). NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.

In other publications, please use:
- Georgiou, L. (2009). NetLogo Santa Fe Ant Trail model. http://www.bangor.ac.uk/~eep201/jge. School of Computer Science, Bangor University, Wales, GB.
- Copyright 1997 Uri Wilensky. All rights reserved. See http://ccl.northwestern.edu/netlogo/models/Ants for terms of use.

CREDITS AND COPYRIGHT NOTICE

All contents (C) 2009 Loukas Georgiou.

Emails: loukas@informatics.bangor.ac.uk, eep201@bangor.ac.uk
Web Site: http://www.bangor.ac.uk/~eep201

The Santa Fe Ant Trail model is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

The Santa Fe Ant Trail model is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with the Santa Fe Ant Trail model. If not, see www.gnu.org/licenses.

REFERENCES

KOZA, J.R. (1992) Genetic Programming: On the Programming of Computers by the Means of Natural Selection. Cambridge, MA: MIT Press.

WILENSKY, U. (1999) NetLogo. Evanston, IL: Center for Connected Learning and Computer-Based Modeling, Northwestern University. Available from http://ccl.northwestern.edu/netlogo.

(back to the NetLogo User Community Models)